package com.hzqc.wxaapp.sdk;

import lombok.AllArgsConstructor;
import org.springframework.cache.annotation.CachePut;
import org.springframework.cache.annotation.Cacheable;


/**
 * @author xiafang
 * @since 2022/8/15 10:33
 */
@AllArgsConstructor
public class MiniAppTokenStorageImpl implements MiniAppTokenStorage {
    private static final String CACHE = "wxa::token";

    @Cacheable(value = {CACHE}, key = "#key")
    @Override
    public String get(String key) {
        return null;
    }

    @CachePut(value = {CACHE}, key = "#key")
    @Override
    public String put(String key, String accessToken) {
     return accessToken;
    }
}
